GtkGLArea: Major reworking
authorAlexander Larsson <alexl@redhat.com>
Thu, 30 Oct 2014 17:22:44 +0000 (18:22 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 30 Oct 2014 20:04:29 +0000 (21:04 +0100)
commit5ea3a1028d7ce19b0411aeb9d72e4aab07fe8c31
treebc4a00781abc3f884b26abbc27208719e20d4e61
parent869f300f0aefcff3b0302a9e4b7297e54f08c1dd
GtkGLArea: Major reworking

This restructures the way buffers are allocated and bound in a way
that is more flexible.

Buffer operation happens in three phases:
create_buffer() - Creates the gl objects
allocate_buffers() - Allocates space for the buffers at a given size
attach_buffers() - Attaches the buffers to the framebuffer and makes
                   the framebuffer the default drawing target
And destroy via
delete_buffers()

We call all these the first draw, and after that we allocate buffers
each time the widget changes size until the buffers are deleted.
We delete the buffers at unrealize.

However, anyone that wants to manually control buffer allocation strategies
can manually call allocate/delete_buffers().

There are also some other changes:
* Support for stencil buffers.
* A manual render mode where ::draw doesn't render unless you manually
  invalidated the previous rendering.
gtk/gtkglarea.c
gtk/gtkglarea.h